const express =require('express')
const app =express()
app.use(express.json())
app.use(require('cors')())
app.set('secret', 'i2u34y12oi3u4y8')
require('./routes/admin')(app)
require('./piugins/db')(app)
require('./routes/web')(app)
app.use('/', express.static(__dirname + '/web'))
app.use('/admin', express.static(__dirname + '/admin'))
app.use('/uploads',express.static(__dirname + '/uploads'))
app.listen(3000,() =>{
    console.log('http://localhost:3000')
})